package net.eearley.redpoint.app;

 
/**
 * The Class Horse.
 */
public class Horse {

	/** The number. */
	private int number;

	/** The name. */
	private String name;

	/** The odds. */
	private int odds;

	/** The did win. */
	private boolean didWin;

	/**
	 * Instantiates a new horse.
	 * 
	 * @param number the number
	 * @param name the name
	 * @param odds the odds
	 * @param didWin the did win
	 */
	public Horse(int number, String name, int odds, boolean didWin) {
		super();
		this.number = number;
		this.name = name;
		this.odds = odds;
		this.didWin = didWin;
	}

	/**
	 * Gets the name.
	 * 
	 * @return the name
	 */
	public String getName() {
		return name;
	}

	/**
	 * Gets the number.
	 * 
	 * @return the number
	 */
	public int getNumber() {
		return number;
	}

	/**
	 * Gets the odds.
	 * 
	 * @return the odds
	 */
	public int getOdds() {
		return odds;
	}

	/**
	 * Checks if is did win.
	 * 
	 * @return true, if is did win
	 */
	public boolean isDidWin() {
		return didWin;
	}

	/**
	 * Sets the did win.
	 * 
	 * @param didWin the new did win
	 */
	public void setDidWin(boolean didWin) {
		this.didWin = didWin;
	}
	
	/**
	 * Sets the name.
	 * 
	 * @param name the new name
	 */
	public void setName(String name) {
		this.name = name;
	}
	
	/**
	 * Sets the number.
	 * 
	 * @param number the new number
	 */
	public void setNumber(int number) {
		this.number = number;
	}
	
	/**
	 * Sets the odds.
	 * 
	 * @param odds the new odds
	 */
	public void setOdds(int odds) {
		this.odds = odds;
	}

	/* (non-Javadoc)
	 * @see java.lang.Object#toString()
	 */
	@Override
	public String toString() {
		String didWinStr = didWin ? "won" : "lost";
		return number + ", " + name + ", " + odds + ", " + didWinStr + "\n";
	}
}
